package com.myjavatime;

import java.text.SimpleDateFormat;
import java.util.Date;

public class SimpleDateFormatClass {
    public static void main(String[] args) {
        SimpleDateFormat s1 = new SimpleDateFormat();
        Date date = new Date();
        String pattern="yyyy--MM--d";
        s1.applyPattern(pattern);
        String f1 = s1.format(date);

        System.out.println(f1);
    }
}
